[mirrors]
https://www.gnupg.org/ftp/gcrypt/pinentry/pinentry-0.9.7.tar.bz2
http://www.ring.gr.jp/pub/net/gnupg/pinentry/pinentry-0.9.7.tar.bz2

[vars]
filesize=432978
sha512=9c5bc8f7246e8b0affd83fea6e64c47cecf6a12515a82dd2a6712b230306a9c3c97da4dbf6519ea98c85c88bf180a5a2b8c46cedcd594f224e5a08f2f0e35bf0
desc='dialogs for secure password input into gnupg'

[deps]
curses
libassuan

[build]
sed -i 's@_MEMORY_H@MY_MEMORY_H@g' secmem/memory.h
ln -sf memory.h secmem/mymemory.h

[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) \
  --with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE -I$PWD/secmem -include mymemory.h" \
CFLAGS="$optcflags" \
CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" $xconfflags \
  --enable-pinentry-curses \
  --with-libassuan-prefix="$butch_root_dir$butch_prefix" \
  --disable-pinentry-gtk2

#[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"

make V=1 -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
